#!/usr/bin/env python
from astropy.io import fits
from glob import glob
import sys

fdir = sys.argv[1]
key = sys.argv[2]
files = glob(fdir+"/*.fits")
for f in files:
    print(f.split("/")[-1],fits.open(f)[0].header[key])
